<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <title>Edit an EPUB</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <link href="../../stylesheet.css" type="text/css" rel="stylesheet"/>
<link href="../../page_styles1.css" type="text/css" rel="stylesheet"/>

  


<link href="../../calibreHtmlOutBasicCss.css" type="text/css" rel="stylesheet" />

</head>
<body>

<div class="calibreMeta">
  <div class="calibreMetaTitle">
  
  
    
    <h1>
      <a href="../../../index.html">Sigil User Guide
</a>
    </h1>
    
    
  
  </div>
  <div class="calibreMetaAuthor">
    0.7.2

  </div>
</div>

<div class="calibreMain">

  <div class="calibreEbookContent">
    
      <div class="calibreEbNavTop">
        
          <a href="tutorial_validate.html" class="calibreAPrev">previous page</a>
        

        
          <a href="tutorial_stylesheets.html" class="calibreANext"> next page</a>
        
      </div>
    

    
  <h2 title="Edit With Find &amp; Replace" class="calibre5">Edit With Find &amp; Replace</h2>

  <p class="calibre1">In Sigil, Find &amp; Replace can be used to find any text in any of your files. And even more important, it can be used to change text – but only in Code View.</p>

  <div class="tip">
    <p class="tiptext">You can only search for text in the current file in Book View. All other Find &amp; Replace actions will switch you to Code View.</p>
  </div>

  <p class="calibre1">To open the Find &amp; Replace, use <span class="shortcut">Search<span class="menuitem">→</span>Find &amp; Replace</span> or its shortcut. The Find &amp; Replace window will open just below your editing window, and will stay there until you close it:</p>

  <div class="image"><img alt="find-replace-options" src="../Images/find-replace-options.png" class="calibre7"/></div>

  <p class="calibre1">There are quite a few option, so if you want to hide some of them you can click on the show/hide chevron on the lower left to hide the Options line (click again to show them again):</p>

  <div class="image"><img alt="find-replace-basic" src="../Images/find-replace-basic.png" class="calibre7"/></div>

  <div class="tip">
    <p class="tiptext">The Find and Replace text boxes are where you enter what to look for and change. The buttons on the right (Find, Replace, Replace/Find, Replace All, and Count All) are used to run your search. The Mode dropdown boxes on the bottom allow you to change what to search for, where to search, and which direction to search in.</p>

    <p class="tiptext">Each dropdown and button has a tooltip with more details.</p>
  </div>

  <h3 class="sigilnotintoc">Using Find &amp; Replace</h3>

  <p class="calibre1">To make a simple change enter some text to search for in the Find box, and in the Replace box enter the new text to replace it with:</p>

  <div class="image"><img alt="tutorial-find-start" src="../Images/tutorial-find-start.png" class="calibre7"/></div>

  <p class="calibre1">Click on <span class="buttonbox">Count All</span> to show how many matches there are for the text in the Find box (Count and Find ignore what is in the Replace box):</p>

  <div class="image"><img alt="tutorial-find-count" src="../Images/tutorial-find-count.png" class="calibre7"/></div>

  <p class="calibre1">You’ll notice that you switched to Code View if you weren’t already using it! This is because all major searches are done in Code View. You should stay in Code View for this tutorial.</p>

  <p class="calibre1">Note that the number of matches is shown on the bottom right.</p>

  <p class="calibre1">Now click on <span class="buttonbox">Find</span>. The next occurrence of the word in the Find box will be highlighted:</p>

  <div class="image"><img alt="tutorial-find-the" src="../Images/tutorial-find-the.png" class="calibre7"/></div>

  <p class="calibre1">Click on <span class="buttonbox">Replace</span> – this changes the text to what is in the Replace box and leaves the new text highlighted:</p>

  <div class="image"><img alt="tutorial-find-test" src="../Images/tutorial-find-test.png" class="calibre7"/></div>

  <p class="calibre1">To make it a little easier to find and replace one occurrence after another, you can use the <span class="buttonbox">Replace/Find</span> button. When you click on this button Sigil will replace the selected text if it matches, and then find and highlight the next match.</p>

  <p class="calibre1">If you are satisfied that the Replace is working okay, you can use <span class="buttonbox">Replace All</span> to update all the matching text in your document at once instead of one at a time.</p>

  <div class="tip">
    <p class="tiptext">Always use Count All and possibly a few Replace commands before using Replace All – to make sure you have entered your find and replace strings correctly.</p>
  </div>

  <p class="calibre1">You may have noticed the selection box containing "Current HTML File". If you change "Current HTML File" to "All HTML Files", your Find or Replace will be done across every HTML file in your EPUB:</p>

  <div class="image"><img alt="tutorial-find-all" src="../Images/tutorial-find-all.png" class="calibre7"/></div>

  <p class="calibre1">This is why editing in Sigil can be done quickly.</p>

  <p class="calibre1">The last main part of Find &amp; Replace is its ability to use Regular Expressions – but see the <a href="../Text/tutorial_advanced_find.html">Advanced Find &amp; Replace</a> chapter for more details.</p>



  </div>

  
  <div class="calibreToc">
    <h2><a href="../../../index.html"> Table of contents</a></h2>
     <div>
  <ul>
    <li>
      <a href="cover_picture.html">Cover</a>
    </li>
    <li>
      <a href="titlepage.html">Title Page</a>
    </li>
    <li>
      <a href="rights.html">Copyright</a>
    </li>
    <li>
      <a href="introduction.html">Introduction</a>
      <ul>
        <li>
          <a href="whats_new.html">What’s New</a>
        </li>
        <li>
          <a href="about_sigil.html">About Sigil</a>
        </li>
        <li>
          <a href="about_epub.html">About EPUB</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="installation.html">Installation</a>
    </li>
    <li>
      <a href="features.html">Features</a>
      <ul>
        <li>
          <a href="user_interface.html">User Interface</a>
        </li>
        <li>
          <a href="preferences.html">Preferences</a>
        </li>
        <li>
          <a href="opening_and_saving_files.html">Opening and Saving Files</a>
        </li>
        <li>
          <a href="book_view.html">Book View</a>
        </li>
        <li>
          <a href="code_view.html">Code View</a>
        </li>
        <li>
          <a href="preview.html">Preview</a>
        </li>
        <li>
          <a href="book_browser.html">Book Browser</a>
        </li>
        <li>
          <a href="metadata.html">Metadata</a>
        </li>
        <li>
          <a href="add_cover.html">Add Cover</a>
        </li>
        <li>
          <a href="table_of_contents.html">Table of Contents</a>
        </li>
        <li>
          <a href="validation.html">Validation</a>
        </li>
        <li>
          <a href="spellcheck.html">Spellcheck</a>
        </li>
        <li>
          <a href="media_files.html">Images, Video, Audio</a>
        </li>
        <li>
          <a href="special_characters.html">Special Characters</a>
        </li>
        <li>
          <a href="splitting_and_merging.html">Splitting and Merging</a>
        </li>
        <li>
          <a href="find_replace.html">Find &amp; Replace</a>
        </li>
        <li>
          <a href="saved_searches.html">Saved Searches</a>
        </li>
        <li>
          <a href="clips.html">Clips</a>
        </li>
        <li>
          <a href="clipboard_history.html">Clipboard History</a>
        </li>
        <li>
          <a href="links.html">Links and IDs</a>
        </li>
        <li>
          <a href="styles.html">Styles</a>
        </li>
        <li>
          <a href="indexes.html">Indexes</a>
        </li>
        <li>
          <a href="reports.html">Reports</a>
        </li>
        <li>
          <a href="external_editors.html">External Editors</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="tutorials.html">Tutorials</a>
      <ul>
        <li>
          <a href="tutorial_getting_started_with_epub.html">Getting Started With EPUB</a>
        </li>
        <li>
          <a href="tutorial_convert_to_html.html">Prepare Your File For Sigil</a>
        </li>
        <li>
          <a href="tutorial_load_file.html">Open Your File With Sigil</a>
        </li>
        <li>
          <a href="tutorial_save.html">Save Your EPUB File</a>
        </li>
        <li>
          <a href="tutorial_metadata.html">Add the Author and Title</a>
        </li>
        <li>
          <a href="tutorial_add_cover.html">Add a Cover Image</a>
        </li>
        <li>
          <a href="tutorial_split.html">Create Files For Each Chapter</a>
        </li>
        <li>
          <a href="tutorial_mark_chapters.html">Identify Your Chapters</a>
        </li>
        <li>
          <a href="tutorial_generate_toc.html">Generate A Table of Contents</a>
        </li>
        <li>
          <a href="tutorial_links.html">Create Links and Notes</a>
        </li>
        <li>
          <a href="tutorial_code_view.html">A Quick Introduction To Code View</a>
        </li>
        <li>
          <a href="tutorial_spelling.html">Check For Spelling Mistakes</a>
        </li>
        <li>
          <a href="tutorial_validate.html">Check For Errors In Your EPUB</a>
        </li>
        <li>
          <a href="tutorial_find_replace.html">Edit With Find &amp; Replace</a>
        </li>
        <li>
          <a href="tutorial_stylesheets.html">Use Stylesheets</a>
        </li>
        <li>
          <a href="tutorial_embed_fonts.html">Include Custom Fonts</a>
        </li>
        <li>
          <a href="tutorial_advanced_find.html">Advanced Find &amp; Replace – Regex</a>
        </li>
        <li>
          <a href="tutorial_regex_reference.html">Regular Expression Reference</a>
        </li>
        <li>
          <a href="tutorial_tips.html">Tips</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="faq.html">FAQ</a>
      <ul>
        <li>
          <a href="faq.html#faq_common_questions">Common Questions</a>
        </li>
        <li>
          <a href="faq.html#faq_questions">Where to Get Help</a>
        </li>
        <li>
          <a href="faq.html#faq_using_sigil">Using Sigil</a>
        </li>
        <li>
          <a href="faq.html#faq_formatting">Formatting and Styles</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="contributing_to_sigil.html">Contributing to Sigil</a>
    </li>
  </ul>
</div>


  </div>
  

  <div class="calibreEbNav">
    
      <a href="tutorial_validate.html" class="calibreAPrev">previous page</a>
    

    <a href="../../../index.html" class="calibreAHome"> start</a>

    
      <a href="tutorial_stylesheets.html" class="calibreANext"> next page</a>
    
  </div>

</div>

</body>
</html>
